package com.example.controller;

import com.example.common.result.Result;
import com.example.entity.vo.CMSMFVo;
import com.example.entity.yifei.Cmsmf;
import com.example.service.CmsmfService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author LiangPandeng
 * @since 2024-03-05
 */
@RestController
@RequestMapping("/cmsmf")
public class CmsmfController {

    @Autowired
    private CmsmfService cmsmfService;

    @ApiOperation("查看CMSMF表")
    @PostMapping("getCMSMF")
    public Result<List> getScheduleStatus() {
        List<Cmsmf> list = cmsmfService.list();
        List<CMSMFVo> res = new ArrayList<>();
        for(int i = 0; i < list.size(); i++) {
            res.add(new CMSMFVo(list.get(i).getMf001(), list.get(i).getMf002(),null,null,null,null));
        }
        return Result.success(res);
    }



}
